package bus;

import java.util.Calendar;

public class Day {
	private Month month;
	private Integer val;
	private String name;
	
	public Day() {	
	}
	
	public Day(String name) {
		this.name = name;
	}
	
	public Day(Month month, Integer val) {
		this.month = month;
		this.val = val;
		
		setDay();
	}
	
	private Integer getVal() {
		return this.val;
	}
	
	private void setVal(Integer val) {
		this.val = val;
	}
	
	private Month getMonth() {
		return this.month;
	}
	
	private void setMonth(Month month) {
		this.month = month;
	}
	
	private void setDay() {
		switch (this.val) {
			case Calendar.SUNDAY:
				this.name = "Sunday";
				break;
			case Calendar.MONDAY:
				this.name = "Monday";
				break;
			case Calendar.TUESDAY:
				this.name = "Tuesday";
				break;
			case Calendar.WEDNESDAY:
				this.name = "Wednesday";
				break;
			case Calendar.THURSDAY:
				this.name = "Thursday";
				break;
			case Calendar.FRIDAY:
				this.name = "Friday";
				break;
			case Calendar.SATURDAY:
				this.name = "Saturday";
				break;
			default:
				break;
		}			
	}
	
	public String getName() {
		return this.name;
	}
}
